<?php

if(!defined('OT_ROOT')) {
	exit('Access Denied');
}


class AppAutoImg{
	public static $appName = '自动配缩略图';
	public static $appID = 165;

	public static $dir		= 'tools/autoImg/';
	public static $imgDir	= 'tools/autoImg/images/';
	public static $layerDir = 'tools/autoImg/layer/';
	public static $fontDir	= 'tools/autoImg/font/';

	public static function Jud(){
		return false;
	}

	public static function Show($str, $def=''){
			return $def;
	}


	public static function InfoOptionBox2(){

	}


	public static function AppSysTrBox1($AS_isAutoImg, $AS_autoImgSizeMode, $AS_autoImgShowMode, $AS_autoImgBgNum, $AS_autoImgLayerNum, $AS_autoImgFontNum, $AS_autoImgFontExt, $AS_autoImgUrlMode){
		return Adm::PluDefItem(self::$appName, '自动配缩略图');
	}


	public static function InfoImg($mode='pc'){

	}

	public static function MakeImg($id,$title,$infoType='',$mode=''){

	}

	public static function ShowImg($jpgPath){

	}

	public static function ImgRelPath($id, $title){
		return 'autoImg/info' . $id . '_'. md5($title) .'.jpg';
	}

	public static function ImgAbsPath($id, $title){
		return OT_ROOT . InfoImgDir . self::ImgRelPath($id, $title);
	}

	public static function ImgUrl($id, $title, $pathHead='', $mode='pc'){
		global $appSysArr;

		if (empty($appSysArr)){ $appSysArr = Cache::PhpFile('appSys'); }
		if ($appSysArr['AS_autoImgUrlMode'] == 1){
			return $pathHead .'autoImg/'. $id .'_'. $title .'.jpg';
		}else{
			return $pathHead .'p.php?m=autoImg&id='. $id .'&title='. urlencode($title) .'&type=.jpg';
		}
	}

	public static function InfoDeal($type, $whereStr, $backURL){

	}

	public static function InfoMake(){

	}
}
?>